<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <script src="../static/js/d3.v3.min.js"></script>
    <script src="../static/js/jquery-1.11.0.min.js"></script>
    <script src="../static/js/echarts.js"></script>
    <script src="../static/js/china.js"></script>
    <style>

        .node {
            cursor: pointer;
        }

        .node circle {
            fill: #357CAE;
            stroke: steelblue;
            stroke-width: 3px;
        }

        .node rect {
            fill: #2990ca;
            stroke: steelblue;
            stroke-width: 1.5px;
        }

        .node text {
            font: 7px sans-serif;
        }

        .link {
            fill: none;
            stroke: #ccc;
            stroke-width: 2px;
        }

    </style>
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <title>AdminLTE 2 | Dashboard</title>

    <!-- Tell the browser to be responsive to screen width -->
    <meta content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no" name="viewport">
    <!-- Bootstrap 3.3.7 -->
    <link rel="stylesheet" href="../static/admin_res/bootstrap/css/bootstrap.min.css">
    <!-- Font Awesome -->
    <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.5.0/css/font-awesome.min.css">
    <!-- Ionicons -->
    <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/ionicons/2.0.1/css/ionicons.min.css">
    <!-- Theme style -->
    <link rel="stylesheet" href="../static/admin_res/dist/css/AdminLTE.min.css">
    <!-- AdminLTE Skins. Choose a skin from the css/skins
         folder instead of downloading all of them to reduce the load. -->
    <link rel="stylesheet" href="../static/admin_res/dist/css/skins/_all-skins.min.css">
    <!-- Morris chart -->
    <link rel="stylesheet" href="../static/admin_res/plugins/morris/morris.css">
    <!-- jvectormap -->
    <link rel="stylesheet" href="../static/admin_res/plugins/jvectormap/jquery-jvectormap-1.2.2.css">
    <!-- Date Picker -->
    <link rel="stylesheet" href="../static/admin_res/plugins/datepicker/datepicker3.css">
    <!-- Daterange picker -->
    <link rel="stylesheet" href="../static/admin_res/plugins/daterangepicker/daterangepicker.css">
    <!-- bootstrap wysihtml5 - text editor -->
    <link rel="stylesheet" href="../static/admin_res/plugins/bootstrap-wysihtml5/bootstrap3-wysihtml5.min.css">
    <!-- Google Font -->
    <link rel="stylesheet"
          href="https://fonts.googleapis.com/css?family=Source+Sans+Pro:300,400,600,700,300italic,400italic,600italic">
</head>
<body class="hold-transition skin-blue sidebar-mini">
<div class="wrapper">

    <header class="main-header">
        <!-- Logo -->

        <!-- Header Navbar: style can be found in header.less -->
        <nav class="navbar navbar-static-top">
            <!-- Sidebar toggle button-->
            <a href="#" class="sidebar-toggle" data-toggle="push-menu" role="button">
                <span class="sr-only">Toggle navigation</span>
            </a>

            <div class="navbar-custom-menu">
                <ul class="nav navbar-nav">
                    <!-- Messages: style can be found in dropdown.less-->

                    <!-- User Account: style can be found in dropdown.less -->
                    <li class="dropdown user user-menu">
                        <a href="#" class="dropdown-toggle" data-toggle="dropdown">
                            <img src="../static/images/user2-160x160.jpg" class="user-image" alt="User Image">
                            <span class="hidden-xs">小菜一碟</span>
                        </a>
                        <ul class="dropdown-menu">
                            <!-- User image -->
                            <li class="user-header">
                                <img src="../static/images/user2-160x160.jpg" class="img-circle" alt="User Image">

                                <p>
                                    Alexander Pierce - Web Developer
                                    <small>Member since Nov. 2012</small>
                                </p>
                            </li>
                            <!-- Menu Body -->
                            <li class="user-body">
                                <div class="row">
                                    <div class="col-xs-4 text-center">
                                        <a href="#">Followers</a>
                                    </div>
                                    <div class="col-xs-4 text-center">
                                        <a href="#">Sales</a>
                                    </div>
                                    <div class="col-xs-4 text-center">
                                        <a href="#">Friends</a>
                                    </div>
                                </div>
                                <!-- /.row -->
                            </li>
                            <!-- Menu Footer-->
                            <li class="user-footer">
                                <div class="pull-left">
                                    <a href="#" class="btn btn-default btn-flat">Profile</a>
                                </div>
                                <div class="pull-right">
                                    <a href="#" class="btn btn-default btn-flat">Sign out</a>
                                </div>
                            </li>
                        </ul>
                    </li>
                    <!-- Control Sidebar Toggle Button -->
                    <li>
                        <a href="#" data-toggle="control-sidebar"><i class="fa fa-gears"></i></a>
                    </li>
                </ul>
            </div>
        </nav>
    </header>
    <!-- Left side column. contains the logo and sidebar -->
    <aside class="main-sidebar">
        <!-- sidebar: style can be found in sidebar.less -->
        <section class="sidebar">
            <!-- Sidebar user panel -->

            <!-- search form -->
            <form action="/search/" method="post" class="sidebar-form">
                {% csrf_token %}
                <div class="input-group">
                    <input type="text" name="q" class="form-control" placeholder="Search...">
                    <input type="hidden" name="Uname" value={{ username }}>
                    <input type="hidden" name="Utel" value={{ tel }}>
                    <input type="hidden" name="Utel" value={{ password }}>
                    <span class="input-group-btn">
                        <button type="submit" name="search" id="search-btn" class="btn btn-flat"><i
                                class="fa fa-search"></i>
                        </button>
                      </span>
                </div>
            </form>
            <!-- /.search form -->

            <!-- sidebar menu: : style can be found in sidebar.less -->
            <ul class="sidebar-menu" data-widget="tree">
                <li>
                    <a href="pages/calendar.html">
                        <i class="fa fa-calendar"></i> <span>Calendar</span>
                        <span class="pull-right-container">
                      <small class="label pull-right bg-red">3</small>
                      <small class="label pull-right bg-blue">17</small>
                    </span>
                    </a>
                </li>
                <li>
                    <a href="pages/mailbox/mailbox.html">
                        <i class="fa fa-envelope"></i> <span>Mailbox</span>
                        <span class="pull-right-container">
                      <small class="label pull-right bg-yellow">12</small>
                      <small class="label pull-right bg-green">16</small>
                      <small class="label pull-right bg-red">5</small>
                    </span>
                    </a>
                </li>
                <li class="treeview">
                    <a href="#">
                        <i class="fa fa-share"></i> <span>Multilevel</span>
                        <span class="pull-right-container">
                      <i class="fa fa-angle-left pull-right"></i>
                    </span>
                    </a>
                    <ul class="treeview-menu">
                        <li class="treeview">
                            <a href="#"><i class="fa fa-circle-o"></i> Level One
                                <span class="pull-right-container">
                          <i class="fa fa-angle-left pull-right"></i>
                        </span>
                            </a>
                            <ul class="treeview-menu">
                                <li><a href="#"><i class="fa fa-circle-o"></i> Level Two</a></li>
                                <li class="treeview">
                                    <a href="#"><i class="fa fa-circle-o"></i> Level Two
                                        <span class="pull-right-container">
                              <i class="fa fa-angle-left pull-right"></i>
                            </span>
                                    </a>
                                    <ul class="treeview-menu">
                                        <li><a href="#"><i class="fa fa-circle-o"></i> Level Three</a></li>
                                        <li><a href="#"><i class="fa fa-circle-o"></i> Level Three</a></li>
                                    </ul>
                                </li>
                            </ul>
                        </li>
                    </ul>
                </li>
            </ul>
        </section>
        <!-- /.sidebar -->
    </aside>

    <!-- Content Wrapper. Contains page content -->
    <div class="content-wrapper">
        <!-- Content Header (Page header) -->
        <section class="content-header">
            <h1>
                Dashboard
                <small>Control panel</small>
            </h1>
            <ol class="breadcrumb">
                <li><a href="#"><i class="fa fa-dashboard"></i>Home</a></li>
                <li class="active">Dashboard</li>
            </ol>
        </section>


        <section class="content" style="width: 100%;height: 100%;">

                <!-- Left side column. contains the logo and sidebar -->
            <div class="warpper">
                <!-- Province -->
                <div id="map" style="min-height:600px"></div>
                <script type="text/javascript">
                    var myChart = echarts.init(document.getElementById('map'), 'shine');
                    var option = {
                        title: {
                            text: '厂商分布图',
                            subtext: '厂商密度'
                        },
                        tooltip: {
                            trigger: 'item',
                            formatter: '{b}<br/>{c}人'
                        },
                        toolbox: {
                            show: true,
                            orient: 'vertical',
                            left: 'right',
                            top: 'center',
                            feature: {
                                dataView: {readOnly: false},
                                restore: {},
                                saveAsImage: {}
                            }
                        },
                        visualMap: {
                            min: 1,
                            max: 100,
                            text: ['High', 'Low'],
                            realtime: false,
                            calculable: true,
                            inRange: {
                                color: ['lightskyblue', 'yellow', 'orangered']
                            }
                        },
                        series: [{
                            name: '中国',
                            type: 'map',
                            mapType: 'china',
                            selectedMode: 'single',//multiple多选
                            itemStyle: {
                                normal: {
                                    label: {
                                        show: true,
                                        textStyle: {
                                            color: "#231816"
                                        }
                                    },
                                    areaStyle: {color: '#B1D0EC'},
                                    color: '#B1D0EC',
                                    borderColor: '#dadfde'//区块的边框颜色
                                },
                                emphasis: {//鼠标hover样式
                                    label: {
                                        show: true,
                                        textStyle: {
                                            color: '#fa4f04'
                                        }
                                    }
                                }
                            },
                            data: {{ province|safe }}

                        }]
                    };
                    myChart.setOption(option);
                </script>


                <div id="hist" style="min-height:600px"></div>
                <script type="text/javascript">
                    var myChart = echarts.init(document.getElementById('hist'));

                    // 指定图表的配置项和数据
                    var option = {
                        title: {
                            text: '直方统计'
                        },
                        tooltip: {},
                        legend: {
                            data:['Shop']
                        },
                        xAxis: {
                            data: {{ ydata|safe }}
                        },
                        yAxis: {},
                        series: [{
                            name: 'Price',
                            type: 'bar',
                            data: {{ xdata|safe }}
                        }]
                    };

                    // 使用刚指定的配置项和数据显示图表。
                    myChart.setOption(option);

                </script>


                <div id="box" style="min-height:600px"></div>
                <script type="text/javascript">
                    var myChart = echarts.init(document.getElementById('box'));
                    var data = echarts.dataTool.prepareBoxplotData({{ xdata|safe }});

                    option = {
                        title: [
                            {
                                text: 'BOX Diagram',
                                left: 'center',
                            }
                        ],
                        tooltip: {
                            trigger: 'item',
                            axisPointer: {
                                type: 'shadow'
                            }
                        },
                        grid: {
                            left: '10%',
                            right: '10%',
                            bottom: '15%'
                        },
                        series: [
                            {
                                name: 'boxplot',
                                type: 'boxplot',
                                data: data.boxData,
                                tooltip: {
                                    formatter: function (param) {
                                        return [
                                            'Experiment ' + param.name + ': ',
                                            'upper: ' + param.data[5],
                                            'Q3: ' + param.data[4],
                                            'median: ' + param.data[3],
                                            'Q1: ' + param.data[2],
                                            'lower: ' + param.data[1]
                                        ].join('<br/>');
                                    }
                                }
                            },
                            {
                                name: 'outlier',
                                type: 'scatter',
                                data: data.outliers
                            }
                        ]
                    };
                    myChart.setOption(option);
                </script>

            </div>
        </section>

        <!-- /.content-wrapper -->
        <footer class="main-footer">
            <div class="pull-right hidden-xs">
                <b>Version</b> 2.4.0
            </div>
            <strong>Copyright &copy; 2018 <a href="https://adminlte.io">Smart Studio</a>.</strong> All rights
            reserved.
        </footer>
        <div class="control-sidebar-bg"></div>

    </div>

</div>

<!-- jQuery 3.1.1 -->
<script src="../static/admin_res/plugins/jQuery/jquery-3.1.1.min.js"></script>
<script>
    $.widget.bridge('uibutton', $.ui.button);
</script>
<!-- Bootstrap 3.3.7 -->
<script src="../static/admin_res/bootstrap/js/bootstrap.min.js"></script>
<!-- Morris.js charts -->
<script src="https://cdnjs.cloudflare.com/ajax/libs/raphael/2.1.0/raphael-min.js"></script>
<script src="../static/admin_res/plugins/morris/morris.min.js"></script>
<!-- Sparkline -->
<script src="../static/admin_res/plugins/sparkline/jquery.sparkline.min.js"></script>
<!-- jvectormap -->
<script src="../static/admin_res/plugins/jvectormap/jquery-jvectormap-1.2.2.min.js"></script>
<script src="../static/admin_res/plugins/jvectormap/jquery-jvectormap-world-mill-en.js"></script>
<!-- jQuery Knob Chart -->
<script src="../static/admin_res/plugins/knob/jquery.knob.js"></script>
<!-- daterangepicker -->
<script src="https://cdnjs.cloudflare.com/ajax/libs/moment.js/2.11.2/moment.min.js"></script>
<script src="../static/admin_res/plugins/daterangepicker/daterangepicker.js"></script>
<!-- datepicker -->
<script src="../static/admin_res/plugins/datepicker/bootstrap-datepicker.js"></script>
<!-- Bootstrap WYSIHTML5 -->
<script src="../static/admin_res/plugins/bootstrap-wysihtml5/bootstrap3-wysihtml5.all.min.js"></script>
<!-- Slimscroll -->
<script src="../static/admin_res/plugins/slimScroll/jquery.slimscroll.min.js"></script>
<!-- FastClick -->
<script src="../static/admin_res/plugins/fastclick/fastclick.js"></script>
<!-- AdminLTE App -->
<script src="../static/admin_res/dist/js/adminlte.min.js"></script>
<!-- AdminLTE dashboard demo (This is only for demo purposes) -->
<script src="../static/admin_res/dist/js/pages/dashboard.js"></script>
<!-- AdminLTE for demo purposes -->
<script src="../static/admin_res/dist/js/demo.js"></script>
</body>
</html>
